package 刷题10月.leecodehot100;

public class Sort {
    public static void main(String[] args) {
        System.out.println(disvion(12,8));
    }
     //求质数
    public static int disvion(int x,int y){
        int t;
        if(x<y){
            t=x;
            x=y;
            y=t;
        }
        while(y!=0){
            if(x==y){
                return x;
            }else {
                int k=x%y;
                x=y;
                y=k;
            }
        }
        return x;
    }
}
